<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>The Base Object Type</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GObject 参考手册">
<link rel="up" href="rn01.html" title="API 参考">
<link rel="prev" href="gobject-GTypeModule.html" title="GTypeModule">
<link rel="next" href="gobject-Enumeration-and-Flag-Types.html" title="Enumeration and Flag Types">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gobject-GTypeModule.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GObject 参考手册</th>
<td><a accesskey="n" href="gobject-Enumeration-and-Flag-Types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gobject-The-Base-Object-Type.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gobject-The-Base-Object-Type.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gobject-The-Base-Object-Type"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gobject-The-Base-Object-Type.top_of_page"></a>The Base Object Type</span></h2>
<p>The Base Object Type — The base object type</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gobject-The-Base-Object-Type.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;glib-object.h&gt;

struct              <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject">GObject</a>;
struct              <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass">GObjectClass</a>;
struct              <a class="link" href="gobject-The-Base-Object-Type.html#GObjectConstructParam" title="struct GObjectConstructParam">GObjectConstructParam</a>;
<span class="returnvalue">void</span>                (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectGetPropertyFunc" title="GObjectGetPropertyFunc ()">*GObjectGetPropertyFunc</a>)           (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectSetPropertyFunc" title="GObjectSetPropertyFunc ()">*GObjectSetPropertyFunc</a>)           (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectFinalizeFunc" title="GObjectFinalizeFunc ()">*GObjectFinalizeFunc</a>)              (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-TYPE-IS-OBJECT:CAPS" title="G_TYPE_IS_OBJECT()">G_TYPE_IS_OBJECT</a>                    (type)
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT:CAPS" title="G_OBJECT()">G_OBJECT</a>                            (object)
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-IS-OBJECT:CAPS" title="G_IS_OBJECT()">G_IS_OBJECT</a>                         (object)
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS" title="G_OBJECT_CLASS()">G_OBJECT_CLASS</a>                      (class)
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-IS-OBJECT-CLASS:CAPS" title="G_IS_OBJECT_CLASS()">G_IS_OBJECT_CLASS</a>                   (class)
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-GET-CLASS:CAPS" title="G_OBJECT_GET_CLASS()">G_OBJECT_GET_CLASS</a>                  (object)
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-TYPE:CAPS" title="G_OBJECT_TYPE()">G_OBJECT_TYPE</a>                       (object)
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-TYPE-NAME:CAPS" title="G_OBJECT_TYPE_NAME()">G_OBJECT_TYPE_NAME</a>                  (object)
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-CLASS-TYPE:CAPS" title="G_OBJECT_CLASS_TYPE()">G_OBJECT_CLASS_TYPE</a>                 (class)
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-CLASS-NAME:CAPS" title="G_OBJECT_CLASS_NAME()">G_OBJECT_CLASS_NAME</a>                 (class)
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-install-property" title="g_object_class_install_property ()">g_object_class_install_property</a>     (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-install-properties" title="g_object_class_install_properties ()">g_object_class_install_properties</a>   (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_pspecs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> **pspecs</code></em>);
<a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> *        <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-find-property" title="g_object_class_find_property ()">g_object_class_find_property</a>        (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);
<a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> **       <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-list-properties" title="g_object_class_list_properties ()">g_object_class_list_properties</a>      (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_properties</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-override-property" title="g_object_class_override_property ()">g_object_class_override_property</a>    (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-interface-install-property" title="g_object_interface_install_property ()">g_object_interface_install_property</a> (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);
<a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> *        <a class="link" href="gobject-The-Base-Object-Type.html#g-object-interface-find-property" title="g_object_interface_find_property ()">g_object_interface_find_property</a>    (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);
<a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> **       <a class="link" href="gobject-The-Base-Object-Type.html#g-object-interface-list-properties" title="g_object_interface_list_properties ()">g_object_interface_list_properties</a>  (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_properties_p</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()">g_object_new</a>                        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-newv" title="g_object_newv ()">g_object_newv</a>                       (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_parameters</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GParameter" title="struct GParameter"><span class="type">GParameter</span></a> *parameters</code></em>);
struct              <a class="link" href="gobject-The-Base-Object-Type.html#GParameter" title="struct GParameter">GParameter</a>;
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()">g_object_ref</a>                        (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()">g_object_unref</a>                      (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()">g_object_ref_sink</a>                   (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-clear-object" title="g_clear_object ()">g_clear_object</a>                      (<em class="parameter"><code>volatile <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> **object_ptr</code></em>);
typedef             <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned">GInitiallyUnowned</a>;
typedef             <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnownedClass" title="GInitiallyUnownedClass">GInitiallyUnownedClass</a>;
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-TYPE-INITIALLY-UNOWNED:CAPS" title="G_TYPE_INITIALLY_UNOWNED">G_TYPE_INITIALLY_UNOWNED</a>
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-is-floating" title="g_object_is_floating ()">g_object_is_floating</a>                (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-force-floating" title="g_object_force_floating ()">g_object_force_floating</a>             (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()">*GWeakNotify</a>)                      (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *where_the_object_was</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-weak-ref" title="g_object_weak_ref ()">g_object_weak_ref</a>                   (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> notify</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-weak-unref" title="g_object_weak_unref ()">g_object_weak_unref</a>                 (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> notify</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-weak-pointer" title="g_object_add_weak_pointer ()">g_object_add_weak_pointer</a>           (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *weak_pointer_location</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-remove-weak-pointer" title="g_object_remove_weak_pointer ()">g_object_remove_weak_pointer</a>        (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *weak_pointer_location</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()">*GToggleNotify</a>)                    (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_last_ref</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-toggle-ref" title="g_object_add_toggle_ref ()">g_object_add_toggle_ref</a>             (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()"><span class="type">GToggleNotify</span></a> notify</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-remove-toggle-ref" title="g_object_remove_toggle_ref ()">g_object_remove_toggle_ref</a>          (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()"><span class="type">GToggleNotify</span></a> notify</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-connect" title="g_object_connect ()">g_object_connect</a>                    (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_spec</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-disconnect" title="g_object_disconnect ()">g_object_disconnect</a>                 (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_spec</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set" title="g_object_set ()">g_object_set</a>                        (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get" title="g_object_get ()">g_object_get</a>                        (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-notify" title="g_object_notify ()">g_object_notify</a>                     (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-notify-by-pspec" title="g_object_notify_by_pspec ()">g_object_notify_by_pspec</a>            (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-freeze-notify" title="g_object_freeze_notify ()">g_object_freeze_notify</a>              (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-thaw-notify" title="g_object_thaw_notify ()">g_object_thaw_notify</a>                (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-data" title="g_object_get_data ()">g_object_get_data</a>                   (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-data" title="g_object_set_data ()">g_object_set_data</a>                   (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-data-full" title="g_object_set_data_full ()">g_object_set_data_full</a>              (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-steal-data" title="g_object_steal_data ()">g_object_steal_data</a>                 (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-qdata" title="g_object_get_qdata ()">g_object_get_qdata</a>                  (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata" title="g_object_set_qdata ()">g_object_set_qdata</a>                  (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata-full" title="g_object_set_qdata_full ()">g_object_set_qdata_full</a>             (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-steal-qdata" title="g_object_steal_qdata ()">g_object_steal_qdata</a>                (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-property" title="g_object_set_property ()">g_object_set_property</a>               (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-property" title="g_object_get_property ()">g_object_get_property</a>               (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);
<a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="returnvalue">GObject</span></a> *           <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new-valist" title="g_object_new_valist ()">g_object_new_valist</a>                 (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-valist" title="g_object_set_valist ()">g_object_set_valist</a>                 (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-valist" title="g_object_get_valist ()">g_object_get_valist</a>                 (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-watch-closure" title="g_object_watch_closure ()">g_object_watch_closure</a>              (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="type">GClosure</span></a> *closure</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-run-dispose" title="g_object_run_dispose ()">g_object_run_dispose</a>                (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);
#define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-WARN-INVALID-PROPERTY-ID:CAPS" title="G_OBJECT_WARN_INVALID_PROPERTY_ID()">G_OBJECT_WARN_INVALID_PROPERTY_ID</a>   (object,
                                                         property_id,
                                                         pspec)
</pre>
</div>
<div class="refsect1">
<a name="gobject-The-Base-Object-Type.description"></a><h2>Description</h2>
<p>
GObject is the fundamental type providing the common attributes and
methods for all object types in GTK+, Pango and other libraries
based on GObject.  The GObject class provides methods for object
construction and destruction, property access methods, and signal
support.  Signals are described in detail in <a class="xref" href="gobject-Signals.html" title="Signals"><span class="refentrytitle"><a name="gobject-Signals.top_of_page"></a>Signals</span>(3)</a>.
</p>
<p>
</p>
<p><a name="floating-ref"></a>
<a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a> is derived from <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>. The only difference between
the two is that the initial reference of a <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a> is flagged
as a <em class="firstterm">floating</em> reference.
This means that it is not specifically claimed to be "owned" by
any code portion. The main motivation for providing floating references is
C convenience. In particular, it allows code to be written as:
</p>
<div class="informalexample"><pre class="programlisting">
container = create_container();
container_add_child (container, create_child());
</pre></div>
<p>
If <code class="function"><code class="function">container_add_child()</code></code> will <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()"><code class="function">g_object_ref_sink()</code></a> the
passed in child, no reference of the newly created child is leaked.
Without floating references, <code class="function"><code class="function">container_add_child()</code></code>
can only <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> the new child, so to implement this code without
reference leaks, it would have to be written as:
</p>
<div class="informalexample"><pre class="programlisting">
Child *child;
container = create_container();
child = create_child();
container_add_child (container, child);
g_object_unref (child);
</pre></div>
<p>
The floating reference can be converted into
an ordinary reference by calling <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()"><code class="function">g_object_ref_sink()</code></a>.
For already sunken objects (objects that don't have a floating reference
anymore), <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()"><code class="function">g_object_ref_sink()</code></a> is equivalent to <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> and returns
a new reference.
Since floating references are useful almost exclusively for C convenience,
language bindings that provide automated reference and memory ownership
maintenance (such as smart pointers or garbage collection) therefore don't
need to expose floating references in their API.
</p>
<p>
</p>
<p>
Some object implementations may need to save an objects floating state
across certain code portions (an example is <span class="type">GtkMenu</span>), to achive this, the
following sequence can be used:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
// save floating state
gboolean was_floating = g_object_is_floating (object);
g_object_ref_sink (object);
// protected code portion
...;
// restore floating state
if (was_floating)
  g_object_force_floating (object);
g_obejct_unref (object); // release previously acquired reference
</pre></div>
<p>
</p>
</div>
<div class="refsect1">
<a name="gobject-The-Base-Object-Type.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GObject"></a><h3>struct GObject</h3>
<pre class="programlisting">struct GObject {
  GTypeInstance  g_type_instance;
};
</pre>
<p>
All the fields in the <span class="structname">GObject</span> structure are private 
to the <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> implementation and should never be accessed directly.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GObjectClass"></a><h3>struct GObjectClass</h3>
<pre class="programlisting">struct GObjectClass {
  GTypeClass   g_type_class;

  /* seldomly overidden */
  GObject*   (*constructor)     (GType                  type,
                                 guint                  n_construct_properties,
                                 GObjectConstructParam *construct_properties);
  /* overridable methods */
  void       (*set_property)		(GObject        *object,
                                         guint           property_id,
                                         const GValue   *value,
                                         GParamSpec     *pspec);
  void       (*get_property)		(GObject        *object,
                                         guint           property_id,
                                         GValue         *value,
                                         GParamSpec     *pspec);
  void       (*dispose)			(GObject        *object);
  void       (*finalize)		(GObject        *object);
  /* seldomly overidden */
  void       (*dispatch_properties_changed) (GObject      *object,
					     guint	   n_pspecs,
					     GParamSpec  **pspecs);
  /* signals */
  void	     (*notify)			(GObject *object,
					 GParamSpec *pspec);

  /* called when done constructing */
  void	     (*constructed)		(GObject *object);
};
</pre>
<p>
The class structure for the <span class="structname">GObject</span> type.
</p>
<p>
</p>
<div class="example">
<a name="id2733444"></a><p class="title"><b>Example 1. Implementing singletons using a constructor</b></p>
<div class="example-contents"><pre class="programlisting">
static MySingleton *the_singleton = NULL;

static GObject*
my_singleton_constructor (GType                  type,
                          guint                  n_construct_params,
                          GObjectConstructParam *construct_params)
{
  GObject *object;
  
  if (!the_singleton)
    {
      object = G_OBJECT_CLASS (parent_class)-&gt;constructor (type,
                                                           n_construct_params,
                                                           construct_params);
      the_singleton = MY_SINGLETON (object);
    }
  else
    object = g_object_ref (G_OBJECT (the_singleton));

  return object;
}
</pre></div>
</div>
<p><br class="example-break">
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> <em class="structfield"><code><a name="GObjectClass.g-type-class"></a>g_type_class</code></em>;</span></p></td>
<td>the parent class</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GObjectClass.constructor"></a>constructor</code></em> ()</span></p></td>
<td>the <em class="parameter"><code>constructor</code></em> function is called by <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()"><code class="function">g_object_new()</code></a> to
complete the object initialization after all the construction properties are
set. The first thing a <em class="parameter"><code>constructor</code></em> implementation must do is chain up to the
<em class="parameter"><code>constructor</code></em> of the parent class. Overriding <em class="parameter"><code>constructor</code></em> should be rarely
needed, e.g. to handle construct properties, or to implement singletons.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GObjectClass.set-property"></a>set_property</code></em> ()</span></p></td>
<td>the generic setter for all properties of this type. Should be
overridden for every type with properties. Implementations of <em class="parameter"><code>set_property</code></em>
don't need to emit property change notification explicitly, this is handled
by the type system.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GObjectClass.get-property"></a>get_property</code></em> ()</span></p></td>
<td>the generic getter for all properties of this type. Should be
overridden for every type with properties.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GObjectClass.dispose"></a>dispose</code></em> ()</span></p></td>
<td>the <em class="parameter"><code>dispose</code></em> function is supposed to drop all references to other
objects, but keep the instance otherwise intact, so that client method
invocations still work. It may be run multiple times (due to reference
loops). Before returning, <em class="parameter"><code>dispose</code></em> should chain up to the <em class="parameter"><code>dispose</code></em> method
of the parent class.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GObjectClass.finalize"></a>finalize</code></em> ()</span></p></td>
<td>instance finalization function, should finish the finalization of
the instance begun in <em class="parameter"><code>dispose</code></em> and chain up to the <em class="parameter"><code>finalize</code></em> method of the
parent class.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GObjectClass.dispatch-properties-changed"></a>dispatch_properties_changed</code></em> ()</span></p></td>
<td>emits property change notification for a bunch
of properties. Overriding <em class="parameter"><code>dispatch_properties_changed</code></em> should be rarely
needed.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GObjectClass.notify"></a>notify</code></em> ()</span></p></td>
<td>the class closure for the notify signal</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GObjectClass.constructed"></a>constructed</code></em> ()</span></p></td>
<td>the <em class="parameter"><code>constructed</code></em> function is called by <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()"><code class="function">g_object_new()</code></a> as the
final step of the object creation process.  At the point of the call, all
construction properties have been set on the object.  The purpose of this
call is to allow for object initialisation steps that can only be performed
after construction properties have been set.  <em class="parameter"><code>constructed</code></em> implementors
should chain up to the <em class="parameter"><code>constructed</code></em> call of their parent class to allow it
to complete its initialisation.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GObjectConstructParam"></a><h3>struct GObjectConstructParam</h3>
<pre class="programlisting">struct GObjectConstructParam {
  GParamSpec *pspec;
  GValue     *value;
};
</pre>
<p>
The <span class="structname">GObjectConstructParam</span> struct is an auxiliary 
structure used to hand <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>/<a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> pairs to the <em class="parameter"><code>constructor</code></em> of
a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *<em class="structfield"><code><a name="GObjectConstructParam.pspec"></a>pspec</code></em>;</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> of the construct parameter</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *<em class="structfield"><code><a name="GObjectConstructParam.value"></a>value</code></em>;</span></p></td>
<td>the value to set the parameter to</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GObjectGetPropertyFunc"></a><h3>GObjectGetPropertyFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GObjectGetPropertyFunc)           (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
<p>
The type of the <em class="parameter"><code>get_property</code></em> function of <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
<td>the numeric id under which the property was registered with
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-install-property" title="g_object_class_install_property ()"><code class="function">g_object_class_install_property()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> to return the property value in</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> describing the property</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GObjectSetPropertyFunc"></a><h3>GObjectSetPropertyFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GObjectSetPropertyFunc)           (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
<p>
The type of the <em class="parameter"><code>set_property</code></em> function of <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
<td>the numeric id under which the property was registered with
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-install-property" title="g_object_class_install_property ()"><code class="function">g_object_class_install_property()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the new value for the property</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> describing the property</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GObjectFinalizeFunc"></a><h3>GObjectFinalizeFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GObjectFinalizeFunc)              (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);</pre>
<p>
The type of the <em class="parameter"><code>finalize</code></em> function of <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> being finalized</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-TYPE-IS-OBJECT:CAPS"></a><h3>G_TYPE_IS_OBJECT()</h3>
<pre class="programlisting">#define G_TYPE_IS_OBJECT(type)      (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT)
</pre>
<p>
Check if the passed in type id is a <a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS" title="G_TYPE_OBJECT"><code class="literal">G_TYPE_OBJECT</code></a> or derived from it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>Type id to check</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> or <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, indicating whether <em class="parameter"><code>type</code></em> is a <a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS" title="G_TYPE_OBJECT"><code class="literal">G_TYPE_OBJECT</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-OBJECT:CAPS"></a><h3>G_OBJECT()</h3>
<pre class="programlisting">#define G_OBJECT(object)            (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject))
</pre>
<p>
Casts a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> or derived pointer into a (GObject*) pointer.
Depending on the current debugging level, this function may invoke
certain runtime checks to identify invalid casts.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>Object which is subject to casting.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-IS-OBJECT:CAPS"></a><h3>G_IS_OBJECT()</h3>
<pre class="programlisting">#define G_IS_OBJECT(object)         (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT))
</pre>
<p>
Checks whether a valid <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> pointer is of type <a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS" title="G_TYPE_OBJECT"><code class="literal">G_TYPE_OBJECT</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>Instance to check for being a <a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS" title="G_TYPE_OBJECT"><code class="literal">G_TYPE_OBJECT</code></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-OBJECT-CLASS:CAPS"></a><h3>G_OBJECT_CLASS()</h3>
<pre class="programlisting">#define G_OBJECT_CLASS(class)       (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass))
</pre>
<p>
Casts a derived <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> structure into a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td>
<td>a valid <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-IS-OBJECT-CLASS:CAPS"></a><h3>G_IS_OBJECT_CLASS()</h3>
<pre class="programlisting">#define G_IS_OBJECT_CLASS(class)    (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT))
</pre>
<p>
Checks whether <em class="parameter"><code>class</code></em> "is a" valid <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> structure of type
<a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS" title="G_TYPE_OBJECT"><code class="literal">G_TYPE_OBJECT</code></a> or derived.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-OBJECT-GET-CLASS:CAPS"></a><h3>G_OBJECT_GET_CLASS()</h3>
<pre class="programlisting">#define G_OBJECT_GET_CLASS(object)  (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass))
</pre>
<p>
Get the class structure associated to a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> instance.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> instance.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>pointer to object class structure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-OBJECT-TYPE:CAPS"></a><h3>G_OBJECT_TYPE()</h3>
<pre class="programlisting">#define G_OBJECT_TYPE(object)       (G_TYPE_FROM_INSTANCE (object))
</pre>
<p>
Get the type id of an object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>Object to return the type id for.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Type id of <em class="parameter"><code>object</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-OBJECT-TYPE-NAME:CAPS"></a><h3>G_OBJECT_TYPE_NAME()</h3>
<pre class="programlisting">#define G_OBJECT_TYPE_NAME(object)  (g_type_name (G_OBJECT_TYPE (object)))
</pre>
<p>
Get the name of an object's type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>Object to return the type name for.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Type name of <em class="parameter"><code>object</code></em>. The string is owned by the type system and
should not be freed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-OBJECT-CLASS-TYPE:CAPS"></a><h3>G_OBJECT_CLASS_TYPE()</h3>
<pre class="programlisting">#define G_OBJECT_CLASS_TYPE(class)  (G_TYPE_FROM_CLASS (class))
</pre>
<p>
Get the type id of a class structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td>
<td>a valid <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Type id of <em class="parameter"><code>class</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-OBJECT-CLASS-NAME:CAPS"></a><h3>G_OBJECT_CLASS_NAME()</h3>
<pre class="programlisting">#define G_OBJECT_CLASS_NAME(class)  (g_type_name (G_OBJECT_CLASS_TYPE (class)))
</pre>
<p>
Return the name of a class structure's type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td>
<td>a valid <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Type name of <em class="parameter"><code>class</code></em>. The string is owned by the type system and
should not be freed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-class-install-property"></a><h3>g_object_class_install_property ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_class_install_property     (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
<p>
Installs a new property. This is usually done in the class initializer.
</p>
<p>
Note that it is possible to redefine a property in a derived class,
by installing a property with the same name. This can be useful at times,
e.g. to change the range of allowed values or the default value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>oclass</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
<td>the id for the new property</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> for the new property</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-class-install-properties"></a><h3>g_object_class_install_properties ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_class_install_properties   (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_pspecs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> **pspecs</code></em>);</pre>
<p>
Installs new properties from an array of <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>s. This is
usually done in the class initializer.
</p>
<p>
The property id of each property is the index of each <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> in
the <em class="parameter"><code>pspecs</code></em> array.
</p>
<p>
The property id of 0 is treated specially by <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> and it should not
be used to store a <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>.
</p>
<p>
This function should be used if you plan to use a static array of
<a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>s and <a class="link" href="gobject-The-Base-Object-Type.html#g-object-notify-by-pspec" title="g_object_notify_by_pspec ()"><code class="function">g_object_notify_by_pspec()</code></a>. For instance, this
class initialization:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
enum {
  PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
};

static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };

static void
my_object_class_init (MyObjectClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

  obj_properties[PROP_FOO] =
    g_param_spec_int ("foo", "Foo", "Foo",
                      -1, G_MAXINT,
                      0,
                      G_PARAM_READWRITE);

  obj_properties[PROP_BAR] =
    g_param_spec_string ("bar", "Bar", "Bar",
                         NULL,
                         G_PARAM_READWRITE);

  gobject_class-&gt;set_property = my_object_set_property;
  gobject_class-&gt;get_property = my_object_get_property;
  g_object_class_install_properties (gobject_class,
                                     N_PROPERTIES,
                                     obj_properties);
}
</pre></div>
<p>
</p>
<p>
allows calling <a class="link" href="gobject-The-Base-Object-Type.html#g-object-notify-by-pspec" title="g_object_notify_by_pspec ()"><code class="function">g_object_notify_by_pspec()</code></a> to notify of property changes:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
void
my_object_set_foo (MyObject *self, gint foo)
{
  if (self-&gt;foo != foo)
    {
      self-&gt;foo = foo;
      g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]);
    }
 }
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>oclass</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_pspecs</code></em> :</span></p></td>
<td>the length of the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>s array</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pspecs</code></em> :</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>s array
defining the new properties. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_pspecs]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-class-find-property"></a><h3>g_object_class_find_property ()</h3>
<pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> *        g_object_class_find_property        (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
<p>
Looks up the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> for a property of a class.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>oclass</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
<td>the name of the property to look up</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> for the property, or
<a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the class doesn't have a property of that name. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-class-list-properties"></a><h3>g_object_class_list_properties ()</h3>
<pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> **       g_object_class_list_properties      (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_properties</code></em>);</pre>
<p>
Get an array of <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>* for all properties of a class.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>oclass</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_properties</code></em> :</span></p></td>
<td>return location for the length of the returned array. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an array of
<a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>* which should be freed after use. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_properties][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-class-override-property"></a><h3>g_object_class_override_property ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_class_override_property    (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Registers <em class="parameter"><code>property_id</code></em> as referring to a property with the
name <em class="parameter"><code>name</code></em> in a parent class or in an interface implemented
by <em class="parameter"><code>oclass</code></em>. This allows this class to <em class="firstterm">override</em>
a property implementation in a parent class or to provide
the implementation of a property from an interface.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
Internally, overriding is implemented by creating a property of type
<a class="link" href="gobject-Standard-Parameter-and-Value-Types.html#GParamSpecOverride" title="struct GParamSpecOverride"><span class="type">GParamSpecOverride</span></a>; generally operations that query the properties of
the object class, such as <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-find-property" title="g_object_class_find_property ()"><code class="function">g_object_class_find_property()</code></a> or
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-list-properties" title="g_object_class_list_properties ()"><code class="function">g_object_class_list_properties()</code></a> will return the overridden
property. However, in one case, the <em class="parameter"><code>construct_properties</code></em> argument of
the <em class="parameter"><code>constructor</code></em> virtual function, the <a class="link" href="gobject-Standard-Parameter-and-Value-Types.html#GParamSpecOverride" title="struct GParamSpecOverride"><span class="type">GParamSpecOverride</span></a> is passed
instead, so that the <em class="parameter"><code>param_id</code></em> field of the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> will be
correct.  For virtually all uses, this makes no difference. If you
need to get the overridden property, you can call
<a class="link" href="gobject-GParamSpec.html#g-param-spec-get-redirect-target" title="g_param_spec_get_redirect_target ()"><code class="function">g_param_spec_get_redirect_target()</code></a>.
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>oclass</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
<td>the new property ID</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of a property registered in a parent class or
in an interface of this class.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-interface-install-property"></a><h3>g_object_interface_install_property ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_interface_install_property (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
<p>
Add a property to an interface; this is only useful for interfaces
that are added to GObject-derived types. Adding a property to an
interface forces all objects classes with that interface to have a
compatible property. The compatible property could be a newly
created <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>, but normally
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-override-property" title="g_object_class_override_property ()"><code class="function">g_object_class_override_property()</code></a> will be used so that the object
class only needs to provide an implementation and inherits the
property description, default value, bounds, and so forth from the
interface property.
</p>
<p>
This function is meant to be called from the interface's default
vtable initialization function (the <em class="parameter"><code>class_init</code></em> member of
<a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>.) It must not be called after after <em class="parameter"><code>class_init</code></em> has
been called for any object types implementing this interface.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
<td>any interface vtable for the interface, or the default
vtable for the interface.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> for the new property</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-interface-find-property"></a><h3>g_object_interface_find_property ()</h3>
<pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> *        g_object_interface_find_property    (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
<p>
Find the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> with the given name for an
interface. Generally, the interface vtable passed in as <em class="parameter"><code>g_iface</code></em>
will be the default vtable from <a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref" title="g_type_default_interface_ref ()"><code class="function">g_type_default_interface_ref()</code></a>, or,
if you know the interface has already been loaded,
<a class="link" href="gobject-Type-Information.html#g-type-default-interface-peek" title="g_type_default_interface_peek ()"><code class="function">g_type_default_interface_peek()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
<td>any interface vtable for the interface, or the default
vtable for the interface</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
<td>name of a property to lookup.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> for the property of the
interface with the name <em class="parameter"><code>property_name</code></em>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
such property exists. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-interface-list-properties"></a><h3>g_object_interface_list_properties ()</h3>
<pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> **       g_object_interface_list_properties  (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_properties_p</code></em>);</pre>
<p>
Lists the properties of an interface.Generally, the interface
vtable passed in as <em class="parameter"><code>g_iface</code></em> will be the default vtable from
<a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref" title="g_type_default_interface_ref ()"><code class="function">g_type_default_interface_ref()</code></a>, or, if you know the interface has
already been loaded, <a class="link" href="gobject-Type-Information.html#g-type-default-interface-peek" title="g_type_default_interface_peek ()"><code class="function">g_type_default_interface_peek()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
<td>any interface vtable for the interface, or the default
vtable for the interface</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_properties_p</code></em> :</span></p></td>
<td>location to store number of properties returned. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a
pointer to an array of pointers to <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>
structures. The paramspecs are owned by GLib, but the
array should be freed with <a href="./../glib/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when you are done with
it. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_properties_p][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-new"></a><h3>g_object_new ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_object_new                        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Creates a new instance of a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> subtype and sets its properties.
</p>
<p>
Construction parameters (see <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT:CAPS"><span class="type">G_PARAM_CONSTRUCT</span></a>, <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT-ONLY:CAPS"><span class="type">G_PARAM_CONSTRUCT_ONLY</span></a>)
which are not explicitly specified are set to their default values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
<td>the type id of the <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> subtype to instantiate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
<td>the name of the first property</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>the value of the first property, followed optionally by more
name/value pairs, followed by <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new instance of <em class="parameter"><code>object_type</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-newv"></a><h3>g_object_newv ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_object_newv                       (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_parameters</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GParameter" title="struct GParameter"><span class="type">GParameter</span></a> *parameters</code></em>);</pre>
<p>
Creates a new instance of a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> subtype and sets its properties.
</p>
<p>
Construction parameters (see <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT:CAPS"><span class="type">G_PARAM_CONSTRUCT</span></a>, <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT-ONLY:CAPS"><span class="type">G_PARAM_CONSTRUCT_ONLY</span></a>)
which are not explicitly specified are set to their default values.
</p>
<p>
Rename to: g_object_new
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
<td>the type id of the <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> subtype to instantiate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_parameters</code></em> :</span></p></td>
<td>the length of the <em class="parameter"><code>parameters</code></em> array</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameters</code></em> :</span></p></td>
<td>an array of <a class="link" href="gobject-The-Base-Object-Type.html#GParameter" title="struct GParameter"><span class="type">GParameter</span></a>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_parameters]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new instance of
<em class="parameter"><code>object_type</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GParameter"></a><h3>struct GParameter</h3>
<pre class="programlisting">struct GParameter {
  const gchar *name;
  GValue       value;
};
</pre>
<p>
The <span class="structname">GParameter</span> struct is an auxiliary structure used
to hand parameter name/value pairs to <a class="link" href="gobject-The-Base-Object-Type.html#g-object-newv" title="g_object_newv ()"><code class="function">g_object_newv()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GParameter.name"></a>name</code></em>;</span></p></td>
<td>the parameter name</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> <em class="structfield"><code><a name="GParameter.value"></a>value</code></em>;</span></p></td>
<td>the parameter value</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-ref"></a><h3>g_object_ref ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_object_ref                        (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
<p>
Increases the reference count of <em class="parameter"><code>object</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the same <em class="parameter"><code>object</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-unref"></a><h3>g_object_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_unref                      (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
<p>
Decreases the reference count of <em class="parameter"><code>object</code></em>. When its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object]</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-ref-sink"></a><h3>g_object_ref_sink ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_object_ref_sink                   (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
<p>
Increase the reference count of <em class="parameter"><code>object</code></em>, and possibly remove the
<a class="link" href="gobject-The-Base-Object-Type.html#floating-ref">floating</a> reference, if <em class="parameter"><code>object</code></em>
has a floating reference.
</p>
<p>
In other words, if the object is floating, then this call "assumes
ownership" of the floating reference, converting it to a normal
reference by clearing the floating flag while leaving the reference
count unchanged.  If the object is not floating, then this call
adds a new normal reference increasing the reference count by one.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>object</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.10</p>
</div>
<hr>
<div class="refsect2">
<a name="g-clear-object"></a><h3>g_clear_object ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_clear_object                      (<em class="parameter"><code>volatile <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> **object_ptr</code></em>);</pre>
<p>
Clears a reference to a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>.
</p>
<p>
<em class="parameter"><code>object_ptr</code></em> must not be <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<p>
If the reference is <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then this function does nothing.
Otherwise, the reference count of the object is decreased and the
pointer is set to <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<p>
This function is threadsafe and modifies the pointer atomically,
using memory barriers where needed.
</p>
<p>
A macro is also included that allows this function to be used without
pointer casts.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object_ptr</code></em> :</span></p></td>
<td>a pointer to a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> reference</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.28</p>
</div>
<hr>
<div class="refsect2">
<a name="GInitiallyUnowned"></a><h3>GInitiallyUnowned</h3>
<pre class="programlisting">typedef struct _GObject                  GInitiallyUnowned;
</pre>
<p>
All the fields in the <span class="structname">GInitiallyUnowned</span> structure 
are private to the <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a> implementation and should never be 
accessed directly.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GInitiallyUnownedClass"></a><h3>GInitiallyUnownedClass</h3>
<pre class="programlisting">typedef struct _GObjectClass             GInitiallyUnownedClass;
</pre>
<p>
The class structure for the <span class="structname">GInitiallyUnowned</span> type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="G-TYPE-INITIALLY-UNOWNED:CAPS"></a><h3>G_TYPE_INITIALLY_UNOWNED</h3>
<pre class="programlisting">#define G_TYPE_INITIALLY_UNOWNED	      (g_initially_unowned_get_type())
</pre>
<p>
The type for <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-is-floating"></a><h3>g_object_is_floating ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_object_is_floating                (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
<p>
Checks whether <em class="parameter"><code>object</code></em> has a <a class="link" href="gobject-The-Base-Object-Type.html#floating-ref">floating</a>
reference.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>object</code></em> has a floating reference</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.10</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-force-floating"></a><h3>g_object_force_floating ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_force_floating             (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);</pre>
<p>
This function is intended for <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> implementations to re-enforce a
<a class="link" href="gobject-The-Base-Object-Type.html#floating-ref">floating</a> object reference.
Doing this is seldomly required: all
<a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a>s are created with a floating reference which
usually just needs to be sunken by calling <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()"><code class="function">g_object_ref_sink()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.10</p>
</div>
<hr>
<div class="refsect2">
<a name="GWeakNotify"></a><h3>GWeakNotify ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GWeakNotify)                      (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *where_the_object_was</code></em>);</pre>
<p>
A <a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> function can be added to an object as a callback that gets
triggered when the object is finalized. Since the object is already being
finalized when the <a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> is called, there's not much you could do 
with the object, apart from e.g. using its adress as hash-index or the like.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data that was provided when the weak reference was established</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>where_the_object_was</code></em> :</span></p></td>
<td>the object being finalized</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-weak-ref"></a><h3>g_object_weak_ref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_weak_ref                   (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> notify</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Adds a weak reference callback to an object. Weak references are
used for notification when an object is finalized. They are called
"weak references" because they allow you to safely hold a pointer
to an object without calling <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> (<a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> adds a
strong reference, that is, forces the object to stay alive).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>
<a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> to reference weakly</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>callback to invoke before the object is freed</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>extra data to pass to notify</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-weak-unref"></a><h3>g_object_weak_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_weak_unref                 (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> notify</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Removes a weak reference callback to an object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>
<a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> to remove a weak reference from</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>callback to search for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to search for</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-add-weak-pointer"></a><h3>g_object_add_weak_pointer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_add_weak_pointer           (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *weak_pointer_location</code></em>);</pre>
<p>
Adds a weak reference from weak_pointer to <em class="parameter"><code>object</code></em> to indicate that
the pointer located at <em class="parameter"><code>weak_pointer_location</code></em> is only valid during
the lifetime of <em class="parameter"><code>object</code></em>. When the <em class="parameter"><code>object</code></em> is finalized,
<em class="parameter"><code>weak_pointer</code></em> will be set to <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The object that should be weak referenced.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>weak_pointer_location</code></em> :</span></p></td>
<td>The memory address of a pointer. <span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-remove-weak-pointer"></a><h3>g_object_remove_weak_pointer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_remove_weak_pointer        (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *weak_pointer_location</code></em>);</pre>
<p>
Removes a weak reference from <em class="parameter"><code>object</code></em> that was previously added
using <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-weak-pointer" title="g_object_add_weak_pointer ()"><code class="function">g_object_add_weak_pointer()</code></a>. The <em class="parameter"><code>weak_pointer_location</code></em> has
to match the one used with <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-weak-pointer" title="g_object_add_weak_pointer ()"><code class="function">g_object_add_weak_pointer()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The object that is weak referenced.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>weak_pointer_location</code></em> :</span></p></td>
<td>The memory address of a pointer. <span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GToggleNotify"></a><h3>GToggleNotify ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GToggleNotify)                    (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_last_ref</code></em>);</pre>
<p>
A callback function used for notification when the state
of a toggle reference changes. See <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-toggle-ref" title="g_object_add_toggle_ref ()"><code class="function">g_object_add_toggle_ref()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>Callback data passed to <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-toggle-ref" title="g_object_add_toggle_ref ()"><code class="function">g_object_add_toggle_ref()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The object on which <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-toggle-ref" title="g_object_add_toggle_ref ()"><code class="function">g_object_add_toggle_ref()</code></a> was called.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_last_ref</code></em> :</span></p></td>
<td>
<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the toggle reference is now the
last reference to the object. <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the toggle
reference was the last reference and there are now other
references.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-add-toggle-ref"></a><h3>g_object_add_toggle_ref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_add_toggle_ref             (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()"><span class="type">GToggleNotify</span></a> notify</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Increases the reference count of the object by one and sets a
callback to be called when all other references to the object are
dropped, or when this is already the last reference to the object
and another reference is established.
</p>
<p>
This functionality is intended for binding <em class="parameter"><code>object</code></em> to a proxy
object managed by another memory manager. This is done with two
paired references: the strong reference added by
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-toggle-ref" title="g_object_add_toggle_ref ()"><code class="function">g_object_add_toggle_ref()</code></a> and a reverse reference to the proxy
object which is either a strong reference or weak reference.
</p>
<p>
The setup is that when there are no other references to <em class="parameter"><code>object</code></em>,
only a weak reference is held in the reverse direction from <em class="parameter"><code>object</code></em>
to the proxy object, but when there are other references held to
<em class="parameter"><code>object</code></em>, a strong reference is held. The <em class="parameter"><code>notify</code></em> callback is called
when the reference from <em class="parameter"><code>object</code></em> to the proxy object should be
<em class="firstterm">toggled</em> from strong to weak (<em class="parameter"><code>is_last_ref</code></em>
true) or weak to strong (<em class="parameter"><code>is_last_ref</code></em> false).
</p>
<p>
Since a (normal) reference must be held to the object before
calling <code class="function">g_object_toggle_ref()</code>, the initial state of the reverse
link is always strong.
</p>
<p>
Multiple toggle references may be added to the same gobject,
however if there are multiple toggle references to an object, none
of them will ever be notified until all but one are removed.  For
this reason, you should only ever use a toggle reference if there
is important state in the proxy object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>a function to call when this reference is the
last reference to the object, or is no longer
the last reference.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>notify</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-remove-toggle-ref"></a><h3>g_object_remove_toggle_ref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_remove_toggle_ref          (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()"><span class="type">GToggleNotify</span></a> notify</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Removes a reference added with <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-toggle-ref" title="g_object_add_toggle_ref ()"><code class="function">g_object_add_toggle_ref()</code></a>. The
reference count of the object is decreased by one.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>a function to call when this reference is the
last reference to the object, or is no longer
the last reference.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>notify</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-connect"></a><h3>g_object_connect ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_object_connect                    (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_spec</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
A convenience function to connect multiple signals at once.
</p>
<p>
The signal specs expected by this function have the form
"modifier::signal_name", where modifier can be one of the following:
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">signal</span></p></td>
<td><p>
equivalent to <code class="literal">g_signal_connect_data (..., NULL, 0)</code>
</p></td>
</tr>
<tr>
<td><p><span class="term">object_signal, </span><span class="term">object-signal</span></p></td>
<td><p>
equivalent to <code class="literal">g_signal_connect_object (..., 0)</code>
</p></td>
</tr>
<tr>
<td><p><span class="term">swapped_signal, </span><span class="term">swapped-signal</span></p></td>
<td><p>
equivalent to <code class="literal">g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)</code>
</p></td>
</tr>
<tr>
<td><p><span class="term">swapped_object_signal, </span><span class="term">swapped-object-signal</span></p></td>
<td><p>
equivalent to <code class="literal">g_signal_connect_object (..., G_CONNECT_SWAPPED)</code>
</p></td>
</tr>
<tr>
<td><p><span class="term">signal_after, </span><span class="term">signal-after</span></p></td>
<td><p>
equivalent to <code class="literal">g_signal_connect_data (..., NULL, G_CONNECT_AFTER)</code>
</p></td>
</tr>
<tr>
<td><p><span class="term">object_signal_after, </span><span class="term">object-signal-after</span></p></td>
<td><p>
equivalent to <code class="literal">g_signal_connect_object (..., G_CONNECT_AFTER)</code>
</p></td>
</tr>
<tr>
<td><p><span class="term">swapped_signal_after, </span><span class="term">swapped-signal-after</span></p></td>
<td><p>
equivalent to <code class="literal">g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)</code>
</p></td>
</tr>
<tr>
<td><p><span class="term">swapped_object_signal_after, </span><span class="term">swapped-object-signal-after</span></p></td>
<td><p>
equivalent to <code class="literal">g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)</code>
</p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
  menu-&gt;toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
						   "type", GTK_WINDOW_POPUP,
						   "child", menu,
						   NULL),
				     "signal::event", gtk_menu_window_event, menu,
				     "signal::size_request", gtk_menu_window_size_request, menu,
				     "signal::destroy", gtk_widget_destroyed, &amp;menu-&gt;toplevel,
				     NULL);
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_spec</code></em> :</span></p></td>
<td>the spec for the first signal</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>
<a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> for the first signal, followed by data for the
first signal, followed optionally by more signal
spec/callback/data triples, followed by <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>object</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-disconnect"></a><h3>g_object_disconnect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_disconnect                 (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_spec</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
A convenience function to disconnect multiple signals at once.
</p>
<p>
The signal specs expected by this function have the form
"any_signal", which means to disconnect any signal with matching
callback and data, or "any_signal::signal_name", which only
disconnects the signal named "signal_name".
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_spec</code></em> :</span></p></td>
<td>the spec for the first signal</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>
<a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> for the first signal, followed by data for the first signal,
followed optionally by more signal spec/callback/data triples,
followed by <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-set"></a><h3>g_object_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_set                        (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Sets properties on an object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
<td>name of the first property to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>value for the first property, followed optionally by more
name/value pairs, followed by <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-get"></a><h3>g_object_get ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_get                        (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Gets properties of an object.
</p>
<p>
In general, a copy is made of the property contents and the caller
is responsible for freeing the memory in the appropriate manner for
the type, for instance by calling <a href="./../glib/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> or <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()"><code class="function">g_object_unref()</code></a>.
</p>
<p>
</p>
<div class="example">
<a name="id2776344"></a><p class="title"><b>Example 2. Using g_object_get()</b></p>
<div class="example-contents">
An example of using <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get" title="g_object_get ()"><code class="function">g_object_get()</code></a> to get the contents
of three properties - one of type <a class="link" href="gobject-Type-Information.html#G-TYPE-INT:CAPS" title="G_TYPE_INT"><span class="type">G_TYPE_INT</span></a>,
one of type <a class="link" href="gobject-Type-Information.html#G-TYPE-STRING:CAPS" title="G_TYPE_STRING"><span class="type">G_TYPE_STRING</span></a>, and one of type <a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS" title="G_TYPE_OBJECT"><span class="type">G_TYPE_OBJECT</span></a>:
<pre class="programlisting">
 gint intval;
 gchar *strval;
 GObject *objval;

 g_object_get (my_object,
               "int-property", &amp;intval,
               "str-property", &amp;strval,
               "obj-property", &amp;objval,
               NULL);

 // Do something with intval, strval, objval

 g_free (strval);
 g_object_unref (objval);
</pre>
</div>
</div>
<p><br class="example-break">
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
<td>name of the first property to get</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>return location for the first property, followed optionally by more
name/return location pairs, followed by <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-notify"></a><h3>g_object_notify ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_notify                     (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
<p>
Emits a "notify" signal for the property <em class="parameter"><code>property_name</code></em> on <em class="parameter"><code>object</code></em>.
</p>
<p>
When possible, eg. when signaling a property change from within the class
that registered the property, you should use <a class="link" href="gobject-The-Base-Object-Type.html#g-object-notify-by-pspec" title="g_object_notify_by_pspec ()"><code class="function">g_object_notify_by_pspec()</code></a>
instead.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
<td>the name of a property installed on the class of <em class="parameter"><code>object</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-notify-by-pspec"></a><h3>g_object_notify_by_pspec ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_notify_by_pspec            (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
<p>
Emits a "notify" signal for the property specified by <em class="parameter"><code>pspec</code></em> on <em class="parameter"><code>object</code></em>.
</p>
<p>
This function omits the property name lookup, hence it is faster than
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-notify" title="g_object_notify ()"><code class="function">g_object_notify()</code></a>.
</p>
<p>
One way to avoid using <a class="link" href="gobject-The-Base-Object-Type.html#g-object-notify" title="g_object_notify ()"><code class="function">g_object_notify()</code></a> from within the
class that registered the properties, and using <a class="link" href="gobject-The-Base-Object-Type.html#g-object-notify-by-pspec" title="g_object_notify_by_pspec ()"><code class="function">g_object_notify_by_pspec()</code></a>
instead, is to store the GParamSpec used with
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-install-property" title="g_object_class_install_property ()"><code class="function">g_object_class_install_property()</code></a> inside a static array, e.g.:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
  enum
  {
    PROP_0,
    PROP_FOO,
    PROP_LAST
  };

  static GParamSpec *properties[PROP_LAST];

  static void
  my_object_class_init (MyObjectClass *klass)
  {
    properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
                                             0, 100,
                                             50,
                                             G_PARAM_READWRITE);
    g_object_class_install_property (gobject_class,
                                     PROP_FOO,
                                     properties[PROP_FOO]);
  }
</pre></div>
<p>
</p>
<p>
and then notify a change on the "foo" property with:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
  g_object_notify_by_pspec (self, properties[PROP_FOO]);
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> of a property installed on the class of <em class="parameter"><code>object</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-object-freeze-notify"></a><h3>g_object_freeze_notify ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_freeze_notify              (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);</pre>
<p>
Increases the freeze count on <em class="parameter"><code>object</code></em>. If the freeze count is
non-zero, the emission of "notify" signals on <em class="parameter"><code>object</code></em> is
stopped. The signals are queued until the freeze count is decreased
to zero.
</p>
<p>
This is necessary for accessors that modify multiple properties to prevent
premature notification while the object is still being modified.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-thaw-notify"></a><h3>g_object_thaw_notify ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_thaw_notify                (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);</pre>
<p>
Reverts the effect of a previous call to
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-freeze-notify" title="g_object_freeze_notify ()"><code class="function">g_object_freeze_notify()</code></a>. The freeze count is decreased on <em class="parameter"><code>object</code></em>
and when it reaches zero, all queued "notify" signals are emitted.
</p>
<p>
It is an error to call this function when the freeze count is zero.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-get-data"></a><h3>g_object_get_data ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_object_get_data                   (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
<p>
Gets a named field from the objects table of associations (see <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-data" title="g_object_set_data ()"><code class="function">g_object_set_data()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>
<a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> containing the associations</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>name of the key for that association</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the data if found, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such data exists. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-set-data"></a><h3>g_object_set_data ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_set_data                   (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Each object carries around a table of associations from
strings to pointers.  This function lets you set an association.
</p>
<p>
If the object already had an association with that name,
the old association will be destroyed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>
<a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> containing the associations.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>name of the key</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to associate with that key</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-set-data-full"></a><h3>g_object_set_data_full ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_set_data_full              (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>
Like <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-data" title="g_object_set_data ()"><code class="function">g_object_set_data()</code></a> except it adds notification
for when the association is destroyed, either by setting it
to a different value or when the object is destroyed.
</p>
<p>
Note that the <em class="parameter"><code>destroy</code></em> callback is not called if <em class="parameter"><code>data</code></em> is <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>
<a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> containing the associations</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>name of the key</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to associate with that key</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>function to call when the association is destroyed</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-steal-data"></a><h3>g_object_steal_data ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_object_steal_data                 (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
<p>
Remove a specified datum from the object's data associations,
without invoking the association's destroy handler.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>
<a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> containing the associations</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>name of the key</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the data if found, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such data exists. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-get-qdata"></a><h3>g_object_get_qdata ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_object_get_qdata                  (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);</pre>
<p>
This function gets back user data pointers stored via
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata" title="g_object_set_qdata ()"><code class="function">g_object_set_qdata()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The GObject to get a stored user data pointer from</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
<td>A <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The user data pointer set, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-set-qdata"></a><h3>g_object_set_qdata ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_set_qdata                  (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
This sets an opaque, named pointer on an object.
The name is specified through a <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> (retrived e.g. via
<a href="./../glib/glib/glib-Quarks.html#g-quark-from-static-string"><code class="function">g_quark_from_static_string()</code></a>), and the pointer
can be gotten back from the <em class="parameter"><code>object</code></em> with <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-qdata" title="g_object_get_qdata ()"><code class="function">g_object_get_qdata()</code></a>
until the <em class="parameter"><code>object</code></em> is finalized.
Setting a previously set user data pointer, overrides (frees)
the old pointer set, using <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> as pointer essentially
removes the data stored.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The GObject to set store a user data pointer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
<td>A <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>An opaque user data pointer</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-set-qdata-full"></a><h3>g_object_set_qdata_full ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_set_qdata_full             (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>
This function works like <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata" title="g_object_set_qdata ()"><code class="function">g_object_set_qdata()</code></a>, but in addition,
a void (*destroy) (gpointer) function may be specified which is
called with <em class="parameter"><code>data</code></em> as argument when the <em class="parameter"><code>object</code></em> is finalized, or
the data is being overwritten by a call to <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata" title="g_object_set_qdata ()"><code class="function">g_object_set_qdata()</code></a>
with the same <em class="parameter"><code>quark</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The GObject to set store a user data pointer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
<td>A <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>An opaque user data pointer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>Function to invoke with <em class="parameter"><code>data</code></em> as argument, when <em class="parameter"><code>data</code></em>
needs to be freed</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-steal-qdata"></a><h3>g_object_steal_qdata ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_object_steal_qdata                (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);</pre>
<p>
This function gets back user data pointers stored via
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata" title="g_object_set_qdata ()"><code class="function">g_object_set_qdata()</code></a> and removes the <em class="parameter"><code>data</code></em> from object
without invoking its <code class="function">destroy()</code> function (if any was
set).
Usually, calling this function is only required to update
user data pointers with a destroy notifier, for example:
</p>
<div class="informalexample"><pre class="programlisting">
void
object_add_to_user_list (GObject     *object,
                         const gchar *new_string)
{
  // the quark, naming the object data
  GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
  // retrive the old string list
  GList *list = g_object_steal_qdata (object, quark_string_list);

  // prepend new string
  list = g_list_prepend (list, g_strdup (new_string));
  // this changed 'list', so we need to set it again
  g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
}
static void
free_string_list (gpointer data)
{
  GList *node, *list = data;

  for (node = list; node; node = node-&gt;next)
    g_free (node-&gt;data);
  g_list_free (list);
}
</pre></div>
<p>
Using <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-qdata" title="g_object_get_qdata ()"><code class="function">g_object_get_qdata()</code></a> in the above example, instead of
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-steal-qdata" title="g_object_steal_qdata ()"><code class="function">g_object_steal_qdata()</code></a> would have left the destroy function set,
and thus the partial string list would have been freed upon
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata-full" title="g_object_set_qdata_full ()"><code class="function">g_object_set_qdata_full()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The GObject to get a stored user data pointer from</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
<td>A <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The user data pointer set, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-set-property"></a><h3>g_object_set_property ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_set_property               (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Sets a property on an object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
<td>the name of the property to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the value</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-get-property"></a><h3>g_object_get_property ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_get_property               (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Gets a property of an object. <em class="parameter"><code>value</code></em> must have been initialized to the
expected type of the property (or a type to which the expected type can be
transformed) using <a class="link" href="gobject-Generic-values.html#g-value-init" title="g_value_init ()"><code class="function">g_value_init()</code></a>.
</p>
<p>
In general, a copy is made of the property contents and the caller is
responsible for freeing the memory by calling <a class="link" href="gobject-Generic-values.html#g-value-unset" title="g_value_unset ()"><code class="function">g_value_unset()</code></a>.
</p>
<p>
Note that <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-property" title="g_object_get_property ()"><code class="function">g_object_get_property()</code></a> is really intended for language
bindings, <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get" title="g_object_get ()"><code class="function">g_object_get()</code></a> is much more convenient for C programming.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
<td>the name of the property to get</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>return location for the property value</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-new-valist"></a><h3>g_object_new_valist ()</h3>
<pre class="programlisting"><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="returnvalue">GObject</span></a> *           g_object_new_valist                 (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
<p>
Creates a new instance of a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> subtype and sets its properties.
</p>
<p>
Construction parameters (see <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT:CAPS"><span class="type">G_PARAM_CONSTRUCT</span></a>, <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT-ONLY:CAPS"><span class="type">G_PARAM_CONSTRUCT_ONLY</span></a>)
which are not explicitly specified are set to their default values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
<td>the type id of the <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> subtype to instantiate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
<td>the name of the first property</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
<td>the value of the first property, followed optionally by more
name/value pairs, followed by <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new instance of <em class="parameter"><code>object_type</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-set-valist"></a><h3>g_object_set_valist ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_set_valist                 (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
<p>
Sets properties on an object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
<td>name of the first property to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
<td>value for the first property, followed optionally by more
name/value pairs, followed by <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-get-valist"></a><h3>g_object_get_valist ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_get_valist                 (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
<p>
Gets properties of an object.
</p>
<p>
In general, a copy is made of the property contents and the caller
is responsible for freeing the memory in the appropriate manner for
the type, for instance by calling <a href="./../glib/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> or <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()"><code class="function">g_object_unref()</code></a>.
</p>
<p>
See <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get" title="g_object_get ()"><code class="function">g_object_get()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
<td>name of the first property to get</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
<td>return location for the first property, followed optionally by more
name/return location pairs, followed by <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-watch-closure"></a><h3>g_object_watch_closure ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_watch_closure              (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="type">GClosure</span></a> *closure</code></em>);</pre>
<p>
This function essentially limits the life time of the <em class="parameter"><code>closure</code></em> to
the life time of the object. That is, when the object is finalized,
the <em class="parameter"><code>closure</code></em> is invalidated by calling <a class="link" href="gobject-Closures.html#g-closure-invalidate" title="g_closure_invalidate ()"><code class="function">g_closure_invalidate()</code></a> on
it, in order to prevent invocations of the closure with a finalized
(nonexisting) object. Also, <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> and <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()"><code class="function">g_object_unref()</code></a> are
added as marshal guards to the <em class="parameter"><code>closure</code></em>, to ensure that an extra
reference count is held on <em class="parameter"><code>object</code></em> during invocation of the
<em class="parameter"><code>closure</code></em>.  Usually, this function will be called on closures that
use this <em class="parameter"><code>object</code></em> as closure data.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>GObject restricting lifetime of <em class="parameter"><code>closure</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
<td>GClosure to watch</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-object-run-dispose"></a><h3>g_object_run_dispose ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_object_run_dispose                (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> *object</code></em>);</pre>
<p>
Releases all references to other objects. This can be used to break
reference cycles.
</p>
<p>
This functions should only be called from object system implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-OBJECT-WARN-INVALID-PROPERTY-ID:CAPS"></a><h3>G_OBJECT_WARN_INVALID_PROPERTY_ID()</h3>
<pre class="programlisting">#define             G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec)</pre>
<p>
This macro should be used to emit a standard warning about unexpected 
properties in <code class="function">set_property()</code> and <code class="function">get_property()</code> implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the <a class="link" href="gobject-The-Base-Object-Type.html#GObject" title="struct GObject"><span class="type">GObject</span></a> on which <code class="function">set_property()</code> or <code class="function">get_property()</code> was called</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
<td>the numeric id of the property</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
<td>the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> of the property</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="gobject-The-Base-Object-Type.see-also"></a><h2>See Also</h2>
<a class="link" href="gobject-Standard-Parameter-and-Value-Types.html#GParamSpecObject" title="struct GParamSpecObject"><span class="type">GParamSpecObject</span></a>, <a class="link" href="gobject-Standard-Parameter-and-Value-Types.html#g-param-spec-object" title="g_param_spec_object ()"><code class="function">g_param_spec_object()</code></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>